package cmd

import (
	"context"
	"im-tools/pkg"

	"github.com/gookit/color"
	"github.com/spf13/cobra"
)

var onlineCmd = &cobra.Command{
	Use:   "online",
	Short: "在线设备",
	Long:  `在线设备列表`,
	Run: func(cmd *cobra.Command, args []string) {
		data := pkg.DBRedis.Get(context.Background(), "user_online:")
		color.Info.Println(data)
	},
}

func init() {
	rootCmd.AddCommand(onlineCmd)
}
